/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.psdk.local;

import android.text.TextUtils;
import com.qihoo.psdk.util.h;
import org.json.JSONObject;

public class g {
    public String a = "";
    public String b = "";
    public String c = "";
    public String d = "";
    public String e = "";
    public String f = "";
    public int g = -1;
    public int h = -1;
    public int i = -1;
    public double j = -1.0D;
    public double k = -1.0D;
    public boolean l = false;
    public boolean m = false;
    public boolean n = false;
    public boolean o = false;
    public String p = "";
    public String q = "";
    public String r = "";
    public String s = "";
    public String t = "";
    public boolean u = false;
    public int v = -1977;
    public String w = "";
    public String x = "";

    public g(String paramString) {
        this.x = paramString;
    }

    public boolean a() {
        int i1 = 0;
        try {
            if (!(TextUtils.isEmpty(this.x))) {
                JSONObject localJSONObject1 = new JSONObject(this.x);
                if (!(localJSONObject1.isNull("displayType"))) {
                    this.a = localJSONObject1.getString("displayType");
                    if (!(localJSONObject1.isNull("body")))
                        if (("notification".equals(this.a)) || ("alert".equals(this.a))) {
                            this.b = localJSONObject1.getJSONObject("body").toString();
                            JSONObject localJSONObject2 = localJSONObject1.getJSONObject("body");
                            if (!(localJSONObject2.isNull("ticker")))
                                this.c = localJSONObject2.getString("ticker");
                            if (!(localJSONObject2.isNull("icon")))
                                this.d = localJSONObject2.getString("icon");
                            if (!(localJSONObject2.isNull("title")))
                                this.e = localJSONObject2.getString("title");
                            if (!(localJSONObject2.isNull("text")))
                                this.f = localJSONObject2.getString("text");
                            if (!(localJSONObject2.isNull("red")))
                                this.g = localJSONObject2.getInt("red");
                            if (!(localJSONObject2.isNull("green")))
                                this.h = localJSONObject2.getInt("green");
                            if (!(localJSONObject2.isNull("blue")))
                                this.i = localJSONObject2.getInt("blue");
                            if (!(localJSONObject2.isNull("alertWidth")))
                                this.j = localJSONObject2.getDouble("alertWidth");
                            if (!(localJSONObject2.isNull("alertHeight")))
                                this.k = localJSONObject2.getDouble("alertHeight");
                            if (!(localJSONObject2.isNull("playVibrate")))
                                this.l = localJSONObject2.getBoolean("playVibrate");
                            if (!(localJSONObject2.isNull("playLights")))
                                this.m = localJSONObject2.getBoolean("playLights");
                            if (!(localJSONObject2.isNull("playSound")))
                                this.n = localJSONObject2.getBoolean("playSound");
                            if (!(localJSONObject2.isNull("forcePush")))
                                this.o = localJSONObject2.getBoolean("forcePush");
                            if (!(localJSONObject2.isNull("auto")))
                                this.u = localJSONObject2.getBoolean("auto");
                            if (!(localJSONObject2.isNull("startype")))
                                this.v = localJSONObject2.getInt("startype");
                            if (!(localJSONObject2.isNull("service")))
                                this.w = localJSONObject2.getString("service");
                            if (!(localJSONObject2.isNull("url")))
                                this.p = localJSONObject2.getString("url");
                            if (!(localJSONObject2.isNull("activity")))
                                this.q = localJSONObject2.getString("activity");
                            if (!(localJSONObject2.isNull("application")))
                                this.r = localJSONObject2.getString("application");
                            if (!(localJSONObject2.isNull("custom")))
                                this.s = localJSONObject2.getString("custom");
                            if (!(localJSONObject2.isNull("app")))
                                this.t = localJSONObject2.getString("app");
                        }
                        else if ("message".equals(this.a)) {
                            this.b = localJSONObject1.getString("body");
                        }
                }
                i1 = 1;
            }
        } catch (Exception localException) {
            h.a("QNotifyBean", localException);
        }
        return i1;
    }
}